package com.atguigu.orderservice.client;

import com.atguigu.commonutils.ClientEntity.ClientCourse;
import com.atguigu.commonutils.ClientEntity.ClientMember;
import com.atguigu.orderservice.client.impl.userClientImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(name = "service-ucenter",fallback= userClientImpl.class)
public interface UserClient {

    /*根据token获取用户信息*/
    @ApiOperation(value = "根据token获取用户信息,返回给前端的是用户的实体类")
    @GetMapping("/userservice/member/getLoginInfo/{userId}")
    ClientMember getLoginInfo(@PathVariable(value = "userId") String userId);


}
